Latest update: September 2018
Command ID | Command name | Description |
---|---|---|
0x0001 | iSDIO_WLAN_Scan | Search for connectable wireless LAN. |
0x0002 | iSDIO_WLAN_Connect | Wireless LAN connection as a station. |
0x0003 | iSDIO_WLAN_Establish | Establishment of wireless LAN connection as access point. |
0x0005 | iSDIO_WLAN_StartWPS | Start of wireless LAN connection setup by WPS as station. |
0x0007 | iSDIO_WLAN_Disconnect | Disconnect the wireless LAN. |
Command ID | Command name | Description |
---|---|---|
0x0011 | iSDIO_WLAN_SetCurrentTime | Set the date and time of FlashAir. |
0x0015 | iSDIO_WLAN_SetChannel | Set the channel number of the access point. |
Command name | Description |
---|---|
iSDIO_WLAN_Request | Sending each HTTP message. |
Command ID | Command name | Description |
---|---|---|
0xE200 | iSDIO_WLAN_Bridge | Start bridge mode. |
0xE201 | iSDIO_WLAN_BridgeGetByRegister | Get bridge mode information. |
Command name | Description |
---|---|
iSDIO_WLAN_GetSSIDs | Get the number of access points. |
iSDIO_WLAN_GetSSID | Get the access point name. |
iSDIO_WLAN_GetStatusData | Obtain output data of Status Register. |
iSDIO_WLAN_GetResponseData | Response Data Register Port output data is obtained. |
iSDIO_WLAN_GetVersion | Get version information. |
iSDIO_WLAN_SetWaitResponseTime | Response Changes the wait timeout value. |
iSDIO_WLAN_Check_WLANConnect | Check the WLAN connection. |
iSDIO_WLAN_Check_WLAN | Check the WLAN On / Off status. |
iSDIO_WLAN_Get_WLAN_Status | Get "WLAN" data of Status Register. |
Command name | Description |
---|---|
iSDIO_WLAN_ReadSharedMemory | Load Shared Memory. |
iSDIO_WLAN_WriteSharedMemory | Write to Shared Memory. |
iSDIO_WLAN_GetFlashAirVersion | Confirm the version and capacity of FlashAir from CID. |
Search for connectable wireless LAN. It is necessary to acquire the response by searching the result.
int32_t iSDIO_WLAN_Scan(
iSDIO_INFO_t *info,
uint32_t seq_id
)
0x0001
Connect the wireless LAN with the SSID and network key of the access point specified as a station.
int32_t iSDIO_WLAN_Connect(
iSDIO_INFO_t *info,
uint32_t seq_id,
uint8_t *ssid,
uint16_t ssid_size,
uint8_t *ntwk_key,
uint32_t ntwk_key_size
)
0x0002
Establish wireless LAN connection with SSID and network key of access point designated as access point.
int32_t iSDIO_WLAN_Establish(
iSDIO_INFO_t *info,
uint32_t seq_id,
uint8_t *ssid,
uint16_t ssid_size,
uint8_t *ntwk_key,
uint32_t ntwk_key_size,
iSDIO_WLAN_EcnMode_t encMode
)
0x0003
As a station, start wireless LAN connection setup by WPS.
int32_t iSDIO_WLAN_StartWPS(
iSDIO_INFO_t *info,
uint32_t seq_id,
uint8_t *ssid,
uint16_t ssid_size,
iSDIO_WLAN_WPSMode_t wpsMode,
uint8_t *pin,
uint32_t pin_size
)
0x0005
When specifying iSDIO_WLAN_WPSMODE_WITH_PBC with wpsMode, specify NULL for ssid, pin, 0
for ssid_size and pin_size.
Disconnect the wireless LAN.
int32_t iSDIO_WLAN_Disconnect(
iSDIO_INFO_t *info,
uint32_t seq_id
)
0x0007
Set the date and time of FlashAir.
int32_t iSDIO_WLAN_SetCurrentTime(
iSDIO_INFO_t *info,
uint32_t seq_id,
iSDIO_WLAN_Date_t currentDate,
iSDIO_WLAN_Time_t currentTime
)
typedef struct iSDIO_WLAN_Date_s {
uint16_t day:5; //!< day
uint16_t month:4; //!< month
uint16_t year:7; //!< year (elapsed year since 1980)
} iSDIO_WLAN_Date_t;
time
typedef struct iSDIO_WLAN_Time_s {
uint16_t second:5; //!< second
uint16_t minute:6; //!< minute
uint16_t hour:5; //!< hour
} iSDIO_WLAN_Time_t;
0x0011
Set the access point's channel number. If FlashAir does not support some channels, this command will
be rejected.
You need to check Capability Register "Channel Support".
See iSDIO Capability Register for Wireless LAN.
int32_t iSDIO_WLAN_SetChannel(
iSDIO_INFO_t *info,
uint32_t seq_id,
uint8_t ch
)
...
...
0x0015
Each HTTP message is transmitted according to the specified parameters.
int32_t iSDIO_WLAN_Request(
iSDIO_INFO_t *info,
uint32_t seq_id,
iSDIO_WLAN_httpType_t host_type,
uint8_t *hostname,
uint32_t hostname_size,
iSDIO_WLAN_MessageType_t msg_type,
uint8_t *message,
uint32_t message_size,
uint8_t *apnd_filename,
uint32_t apnd_filename_size,
iSDIO_WLAN_HeaderRemoval_t headerRemoval
)
80
, unless a proxy server is used.443
, unless a proxy server is used.
Each HTTP message is transmitted according to the specified parameters. Only the following combinations are valid for parameters.
(For processing details see iSDIO_WLAN_SendHTTPMessageByRegister)
host_type | iSDIO_WLAN_HTTP |
---|---|
*hostname | Start address of the buffer in which the host name is stored |
hostname_size | Data length of host name |
msg_type | iSDIO_WLAN_MSG_REGISTER |
*message | Start address of buffer in which message is stored |
message_size | Message data length |
*apnd_filename | NULL |
apnd_filename_size | 0 |
headerRemoval | No setting required |
(For processing details see iSDIO_WLAN_SendHTTPFileByRegister)
host_type | iSDIO_WLAN_HTTP |
---|---|
*hostname | Start address of the buffer in which the host name is stored |
hostname_size | Data length of host name |
msg_type | iSDIO_WLAN_MSG_REGISTER |
*message | Start address of buffer in which message is stored |
message_size | Message data length |
*apnd_filename | Path of file to send to server |
apnd_filename_size | Data length of apnd_filename |
headerRemoval | No setting required |
(For processing details see iSDIO_WLAN_SendHTTPSSLMessageByRegister)
host_type | iSDIO_WLAN_HTTPSSL |
---|---|
*hostname | Start address of the buffer in which the host name is stored |
hostname_size | Data length of host name |
msg_type | iSDIO_WLAN_MSG_REGISTER |
*message | Start address of buffer in which message is stored |
message_size | Message data length |
*apnd_filename | NULL |
apnd_filename_size | 0 |
headerRemoval | No setting required |
(For processing details see iSDIO_WLAN_SendHTTPSSLFileByRegister)
host_type | iSDIO_WLAN_HTTPSSL |
---|---|
*hostname | Start address of the buffer in which the host name is stored |
hostname_size | Data length of host name |
msg_type | iSDIO_WLAN_MSG_REGISTER |
*message | Start address of buffer in which message is stored |
message_size | Message data length |
*apnd_filename | Path of file to send to server |
apnd_filename_size | Data length of apnd_filename |
headerRemoval | No setting required |
(For processing details see iSDIO_WLAN_SendHTTPMessageByFile)
host_type | iSDIO_WLAN_HTTP |
---|---|
*hostname | Start address of the buffer in which the host name is stored |
hostname_size | Data length of host name |
msg_type | iSDIO_WLAN_MSG_FILE |
*message | Path of outgoing message file |
message_size | Data length of path |
*apnd_filename | NULL |
apnd_filename_size | 0 |
headerRemoval | iSDIO_WLAN_WITH_HEADER or iSDIO_WLAN_ONLY_BODY |
(For processing details see iSDIO_WLAN_SendHTTPFileByFile)
host_type | iSDIO_WLAN_HTTP |
---|---|
*hostname | Start address of the buffer in which the host name is stored |
hostname_size | Data length of host name |
msg_type | iSDIO_WLAN_MSG_FILE |
*message | Path of outgoing message file |
message_size | Data length of path |
*apnd_filename | Path of file to send to server |
apnd_filename_size | Data length of apnd_filename |
headerRemoval | iSDIO_WLAN_WITH_HEADER or iSDIO_WLAN_ONLY_BODY |
(For processing details see iSDIO_WLAN_SendHTTPSSLMessageByFile)
host_type | iSDIO_WLAN_HTTPSSL |
---|---|
*hostname | Start address of the buffer in which the host name is stored |
hostname_size | Data length of host name |
msg_type | iSDIO_WLAN_MSG_FILE |
*message | Start address of buffer in which message is stored |
message_size | Data length of path |
*apnd_filename | NULL |
apnd_filename_size | 0 |
headerRemoval | iSDIO_WLAN_WITH_HEADER or iSDIO_WLAN_ONLY_BODY |
(For processing details see iSDIO_WLAN_SendHTTPSSLFileByFile)
host_type | iSDIO_WLAN_HTTPSSL |
---|---|
*hostname | Start address of the buffer in which the host name is stored |
hostname_size | Data length of host name |
msg_type | iSDIO_WLAN_MSG_FILE |
*message | Start address of buffer in which message is stored |
message_size | Data length of path |
*apnd_filename | Path of file to send to server |
apnd_filename_size | Data length of apnd_filename |
headerRemoval | iSDIO_WLAN_WITH_HEADER or iSDIO_WLAN_ONLY_BODY |
In the case of SSL, it is recommended to set root authentication with iSDIO_WLAN_SetCertificate or
iSDIO_WLAN_SetCertificateByFile before executing this API.
If you execute this API without setting root authentication, FlashAir executes the command without
authenticating the server certificate by root authentication.
Start bridge mode.
Connect to the STA specified by brgssid, and then start the AP using apssid.
int32_t iSDIO_WLAN_Bridge(
iSDIO_INFO_t *info,
uint32_t seq_id,
uint8_t *apssid,
uint8_t *apnetworkKey,
iSDIO_WLAN_EcnMode_t encMode,
uint8_t *brgssid,
uint8_t *brgnetworkKey
)
0xE200
Bridge can not be executed unless it is in disconnected state.
If FlashAir is connected to another device, first execute iSDIO_WLAN_Disconnect.
Please execute after 6 seconds to execute Bridge again after disconnecting.
Get bridge mode information. The acquired bridge mode information is set in the output data of Response Data Register Port.
int32_t iSDIO_WLAN_BridgeGetByRegister(
iSDIO_INFO_t *info,
uint32_t seq_id
)
0xE201
The structure of the bridge mode information is as follows.
typedef struct iSDIO_WLAN_BridgeListItem_s {
uint32_t status;
uint8_t appssid[32+4];
uint8_t appnetworkKey[64+4];
uint8_t ipaddr[4];
uint8_t subnetMask[4];
uint8_t defGateWay[4];
uint8_t prefDnsServer[4];
uint8_t altDnsServer[4];
uint8_t brgssid[32+4];
uint8_t brgnetworkKey[64+4];
uint8_t brgIpaddr[4];
uint8_t brgsunetMask[4];
uint8_t brgdefGateWay[4];
uint8_t brgprefDnsServer[4];
uint8_t brgaltDnsServer[4];
} iSDIO_WLAN_BridgeListItem_t;
This API is for outputting bridge mode information to Response Data Register Port.
In order to actually obtain bridge mode information, it is necessary to read Response Data Register
Port.
Get the number of access points scanned.
int32_t iSDIO_WLAN_GetSSIDs(
iSDIO_INFO_t *info,
uint8_t *num
)
It must be executed after acquiring the response of iSDIO_WLAN_Scan.
The number of access points can not be acquired correctly even if it is executed in other conditions.
Acquire the access point name corresponding to the scanned specified number.
int32_t iSDIO_WLAN_GetSSID(
iSDIO_INFO_t *info,
uint8_t number,
uint8_t *ssid
)
It must be executed after acquiring the response of iSDIO_WLAN_Scan.
The number of access points can not be acquired correctly even if it is executed in other conditions.
Obtain output data of Status Register. The current Status Register information is stored at the address specified by Argumentgetbuf.
int32_t iSDIO_WLAN_GetStatusData(
iSDIO_INFO_t *info,
uint8_t *getbuf
)
Response Data Register Port output data is obtained. The information of the current Response Data Register Port is stored at the address specified by Argumentgetbuf.
int32_t iSDIO_WLAN_GetResponseData(
iSDIO_INFO_t *info,
uint8_t *getbuf
)
Read the version information (0x005f0 - 0x005ff) stored in the Status Register.
int32_t iSDIO_WLAN_GetVersion(
iSDIO_INFO_t *info,
uint8_t *getbuf
)
Response Changes the wait timeout value. Set the timeout value in ms.
void iSDIO_WLAN_SetWaitResponseTime(
uint32_t time
)
None
Check the WLAN connection. The connection status is judged by Connected of 0506h (bit 7) of Status Register.
int32_t iSDIO_WLAN_Check_WLANConnect(
iSDIO_INFO_t *info,
iSDIO_WLAN_Connect_t *connect
)
Check the WLAN On / Off status. The connection status is determined by Infra-Direct 0506h (bit 6-5) of
Status Register.
※00:OFF、01/10:ON
int32_t iSDIO_WLAN_Check_WLAN(
iSDIO_INFO_t *info,
iSDIO_WLAN_OnOFF_t *onoff
)
Get "WLAN" data of Status Register. Get 0506h of Status Register for WLAN information.
int32_t iSDIO_WLAN_Get_WLAN_Status(
iSDIO_INFO_t *info,
uint8_t *param
)
It reads data from Shared Memory.
int32_t iSDIO_WLAN_ReadSharedMemory(
iSDIO_INFO_t *info,
uint32_t addr,
uint32_t len,
uint8_t buf
)
Write data to Shared Memory.
int32_t iSDIO_WLAN_WriteSharedMemory(
iSDIO_INFO_t *info,
uint32_t addr,
uint32_t len,
uint8_t buf
)
Confirm the version and capacity of FlashAir from CID.
int32_t iSDIO_WLAN_GetFlashAirVersion(
iSDIO_INFO_t *info,
uint8_t cardver,
uint16_t cardsize
)
The relationship between cardver, cardsize and version and capacity of FlashAir is as follows.
cardver | cardsize | Version and capacity |
---|---|---|
2 | 8 | FlashAir W02 8G |
2 | 16 | FlashAir W02 16G |
2 | 32 | FlashAir W02 32G |
3 | 8 | FlashAir W03 8G |
3 | 16 | FlashAir W03 16G |
3 | 32 | FlashAir W03 32G |
4 | 16 | FlashAir W04 16G |
4 | 32 | FlashAir W04 32G |
4 | 64 | FlashAir W04 64G |
255 | Other than 0 | Flash version of cardsize in version unknown |
255 | 0 | Version, FlashAir of unknown capacity |
0 | 0 | Not FlashAir |
This function is available when the SD card slot is 1 slot system file and the device file is located in / dev / mmcblk 0.